package com.kandinfo.base.admin.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kandinfo.base.admin.domain.UserGroup;
import com.kandinfo.base.admin.repository.UserGroupRepository;
import com.kandinfo.base.admin.service.UserGroupService;
import com.kandinfo.base.common.service.AbstractService;

/**
 * Class Name: UserGroupServiceImpl Description: 用户群组
 * 
 * @author wandongwang
 *
 */
@Service
public class UserGroupServiceImpl extends AbstractService<UserGroup, Long, UserGroupRepository> implements
        UserGroupService {

    @Resource
    public void setUserGroupRepository(UserGroupRepository userGroupRepository){
        super.setRepository(userGroupRepository);
    }
    
    
    @Autowired
    private UserGroupRepository userGroupRepository;

    @Override
    public List<UserGroup> findByGroupId(Long groupId) {
        return userGroupRepository.findByGroupId(groupId);
    }

	@Override
	public List<UserGroup> findByUserId(Long userId) {
		return userGroupRepository.findByUserId(userId);
	}

}
